-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add command to export specification json #277
Conversation
This would be pretty useful, actually came up to suggest the same thing, would love to see it merged |
@princejohnsantillan hey! Thanks for the contribution. Quick question, what happens with the file later? Or you export it to |
Not the author, but I personally would just like to have the file anywhere in the app so I can then use my client generator without having to start up the server in of itself, it's nice and easy for automation, as I've seen that sometimes Scramble doesn't detect the types correctly, filling them as string and I need to generate my client 2 times. |
@WildEgo Trying to figure out the best default file location here. Can you please elaborate on how exactly you're going to use the file?
|
I personally have no need for it to be in the public folder, I just install something like |
@romalytvynenko thank you for looking into my PR 😁
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
@princejohnsantillan tests are failing. Will merge after those are green! Thank you! |
@romalytvynenko tests fixed. Sorry for the delay. I was on holiday break. |
This PR adds a command to export the openapi specification json.
The idea came from my attempt to use this package on an existing site that's deployed to Vapor. Because of the nature of the documentation page where the specification is built during the request, this caused the request to take longer than 30 seconds for my project. Since Vapor times out after 30 seconds the docs page could not load. With that, it would be great to have the ability to export the specification first and use that file instead. This PR is step 1 to making that possible.
Solves #276